<template>
	<view>
		<view class="main">
			<view class="iptBox flex-between">
				<input v-model="nickname" class="ipt" type="text" placeholder="请输入昵称"
					placeholder-style="color: #b6b6b6;font-size: 32rpx;">
			</view>
			<button class="btn" @click="subFun">确认修改</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				nickname: ''
			};
		},
		methods: {
			subFun() {
				this.$post({
					module: 'User',
					interface: '1001',
					data: {
						nickname: this.nickname
					}
				}).then((res) => {
					// console.log(res);
					uni.showToast({
						title: res.message,
						icon: "none",
						duration: 1500,
					})
					setTimeout(() => {
						uni.navigateBack()
					}, 1000)
				})
			}

		}
	}
</script>

<style scoped lang="scss">
	.main {
		padding: 0 72rpx;

		.iptBox {
			height: 104rpx;
			background: rgba(191, 191, 191, 0.1);
			border-radius: 52rpx;
			margin-top: 48rpx;
			padding: 0 36rpx;

			.ipt {
				font-size: 32rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #000000;
				line-height: 44rpx;
			}

			.captcha {
				padding: 0;
				margin: 0;
				font-size: 32rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #F2615F;
				border: none;
			}
		}

		.btn {
			height: 104rpx;
			background: #F2615F;
			border-radius: 52rpx;
			font-size: 36rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #ffffff;
			margin: 340rpx 0 0;
			padding: 0;
		}


	}
</style>
